﻿<UserControl  x:Class="Starehe.Views.NewStaff"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:Controls="clr-namespace:Helper.Controls;assembly=Helper"
      xmlns:local="clr-namespace:Starehe"
      mc:Ignorable="d" 
       d:DesignHeight="700" d:DesignWidth="984" Background="White">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Helper;component/Converters/Converters.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <TextBlock HorizontalAlignment="Left" Margin="20,20,0,0" Style="{DynamicResource Title}"  Text="Staff Registration" VerticalAlignment="Top"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="120,80,0,0" 
                 Text="{Binding NewStaff.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                 VerticalAlignment="Top" Width="200"/>
        <TextBlock HorizontalAlignment="Left" Margin="25,80,0,0"  Text="Name" VerticalAlignment="Top"/>
        <TextBlock HorizontalAlignment="Left" Margin="25,125,0,0" Text="National ID" VerticalAlignment="Top"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="120,125,0,0" 
                 Text="{Binding NewStaff.NationalID, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                 VerticalAlignment="Top" Width="200"/>
        <TextBlock HorizontalAlignment="Left" Margin="25,170,0,0" TextWrapping="Wrap" Text="Date Started" VerticalAlignment="Top"/>
        <DatePicker HorizontalAlignment="Left" Height="23" Margin="120,170,0,0" VerticalAlignment="Top" Width="200"
                    SelectedDate="{Binding NewStaff.DateOfAdmission,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                    SelectedDateFormat="Long"/>
        <TextBlock HorizontalAlignment="Left" Margin="25,215,0,0" TextWrapping="Wrap" Text="Phone No" VerticalAlignment="Top"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="120,215,0,0" 
                 Text="{Binding NewStaff.PhoneNo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                 VerticalAlignment="Top" Width="200"/>
        <TextBlock HorizontalAlignment="Left" Margin="25,260,0,0" TextWrapping="Wrap" Text="Email" VerticalAlignment="Top"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="120,260,0,0" 
                 Text="{Binding NewStaff.Email, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                 VerticalAlignment="Top" Width="280"/>
        <TextBox HorizontalAlignment="Left" Margin="120,305,0,0" VerticalAlignment="Top" Width="200"  
                 Text="{Binding NewStaff.Address,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox HorizontalAlignment="Left" Margin="120,350,0,0" VerticalAlignment="Top" Width="200"  
                 Text="{Binding NewStaff.City,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox HorizontalAlignment="Left" Margin="120,395,0,0" VerticalAlignment="Top" Width="200"
                 Text="{Binding NewStaff.PostalCode,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

        <TextBlock HorizontalAlignment="Left" Margin="425,100,0,0" Style="{DynamicResource Title0}" Text="Photo" VerticalAlignment="Top"/>
        <Border BorderBrush="{DynamicResource TitleBackgroundBrush}" BorderThickness="2" Margin="425,130,10,0" VerticalAlignment="Top" Height="300">
            <Image Source="{Binding NewStaff.SPhoto, Converter={StaticResource StreamToImageSourceConverter}, Mode=OneWay}" Stretch="Uniform"/>
        </Border>
        <TextBlock  HorizontalAlignment="Left" Margin="25,305,0,0" Name="textBlock10" Text="Address" VerticalAlignment="Top" />

        <TextBlock HorizontalAlignment="Left" Margin="25,350,0,0" TextWrapping="Wrap" Text="City" VerticalAlignment="Top"/>

        <TextBlock HorizontalAlignment="Left" Margin="25,395,0,0" TextWrapping="Wrap" Text="Postal Code" VerticalAlignment="Top"/>

        <Button Content="_Select" Margin="0,435,10,0" HorizontalAlignment="Right" Width="75" Height="26" VerticalAlignment="Top"
                Command="{Binding BrowseCommand}"/>
        <Button Content="_Save" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75"
                Command="{Binding SaveCommand}"/>
    </Grid>
</UserControl>
